package com.hyt.it.ogt.ks.enums.log;

import lombok.Getter;

/**
 * @author wuyingge
 * @version 1.0.0
 * @ClassName CandidateAnswerLogType.java
 * @Description 考生作答轨迹小类型
 * @createTime 2022年11月24日 18:10:00
 */
@Getter
public enum CandidateAnswerLogType {

    ANSWER(101, "提交答案（有答案）"),
    ANSWER_NO(102, "提交答案（无答案）"),
    MARK(103, "标记"),
    FINISH(104, "交卷");

    private Integer code;
    private String msg;

    CandidateAnswerLogType(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static String getMsg(Integer code) {
        for (CandidateAnswerLogType value : CandidateAnswerLogType.values()) {
            if(value.getCode().equals(code)) {
                return value.getMsg();
            }
        }
        return null;
    }
}
